package com.hsy.crm.web.domain.entity;

import com.hsy.crm.web.domain.cm.NotInit;
import com.hsy.crm.web.domain.cm.Validate;

import javax.persistence.Column;
import javax.persistence.Table;

/**
 * 供应商
 */
@Table(name = "sys_vendor")
public class Vendor extends BaseEntity{

    /**
     * 名称
     */
    @Validate
    @Column(length = 20)
    private String name;

    /**
     * 编号
     */
    @Validate
    @Column(length = 20)
    private String code;

    /**
     * 期初日期
     */
    @NotInit
    @Column(length = 20)
    private Long date;

    /**
     * 期初余额
     */
    @NotInit
    @Column(length = 20)
    private Long balance;

    /**
     * 预收款
     */
    @Column(length = 20)
    private Long advanceInBalance;

    /**
     * 预付款
     */
    @Column(length = 20)
    private Long advanceOutBalance;

    @Validate
    @Column(length = 20)
    private Long companyId;

    /**
     * 供应商类别
     */
    @Column(length = 20)
    private Long vendorTypeId;

    /**
     * 联系人
     */
    @Column(length = 5)
    private String contact;

    /**
     * 联系电话
     */
    @Column(length = 20)
    private String contactPhone;

    /**
     * 联系地址
     */
    @Column(length = 30)
    private String address;

    /**
     * qq/微信/email
     */
    @Column(length = 30)
    private String otherContact;

    /**
     * 欠款  是指供应商欠我的钱
     */
    @Column(length = 19)
    private Long debtMoney;

    /**
     * 备注
     */
    @Column(length = 100)
    private String remarks;

    @Validate
    private Long createUserId;

    @Validate
    private Long createTime;

    @Validate(insert=false,update=true)
    private Long updateUserId;

    @Validate(insert=false,update=true)
    private Long updateTime;

    public Long getAdvanceInBalance() {
        return advanceInBalance;
    }

    public void setAdvanceInBalance(Long advanceInBalance) {
        this.advanceInBalance = advanceInBalance;
    }

    public Long getAdvanceOutBalance() {
        return advanceOutBalance;
    }

    public void setAdvanceOutBalance(Long advanceOutBalance) {
        this.advanceOutBalance = advanceOutBalance;
    }

    public Long getDebtMoney() {
        return debtMoney;
    }

    public void setDebtMoney(Long debtMoney) {
        this.debtMoney = debtMoney;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Long getDate() {
        return date;
    }

    public void setDate(Long date) {
        this.date = date;
    }

    public Long getBalance() {
        return balance;
    }

    public void setBalance(Long balance) {
        this.balance = balance;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public Long getVendorTypeId() {
        return vendorTypeId;
    }

    public void setVendorTypeId(Long vendorTypeId) {
        this.vendorTypeId = vendorTypeId;
    }

    public String getContact() {
        return contact;
    }

    public void setContact(String contact) {
        this.contact = contact;
    }

    public String getContactPhone() {
        return contactPhone;
    }

    public void setContactPhone(String contactPhone) {
        this.contactPhone = contactPhone;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getOtherContact() {
        return otherContact;
    }

    public void setOtherContact(String otherContact) {
        this.otherContact = otherContact;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public Long getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(Long createUserId) {
        this.createUserId = createUserId;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public Long getUpdateUserId() {
        return updateUserId;
    }

    public void setUpdateUserId(Long updateUserId) {
        this.updateUserId = updateUserId;
    }

    public Long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Long updateTime) {
        this.updateTime = updateTime;
    }
}
